-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate users scraping #124
Conversation
This PR may introduce a bug resulting in database inflation (Jira ticket : https://mila-iqia.atlassian.net/browse/SARC-363) |
for revision comparison in `has_changed` method
database inflation bug solved :) |
# MyMila scraping "NotImplementedError" is temporary ignored until we have a working fetching implementation, | ||
# or a working workaround using CSV cache. | ||
with using_trace( | ||
"sarc.ldap.acquire", "fetch_mymila", exception_types=(NotImplementedError,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je l'ai fait comme ça, de manière à gérer les deux cas:
- en l'absence de fichier CSV de mymila (dans ce cas la lecture du cache échoue), fetch_mymila est appelée, une exception "Not Implemented" est lancée et gracieusement catchée, et MonMila est donc simplement ignoré
- si on a le CSV, il est manuellement placé dans le répertoire de cache et directement lu.
Pour l'heure le traitement de ce fichier est l'objet d'une autre PR ( #120 ) mais pas encore Ok. Donc on ne place simplement pas le CSV en prod et le code fonctionne en l'état.
This PR's goal is to fix some details about
acquire users
:NotImplementedException
raised byfetch_mymila
, until the PR Add mymila fields #120 is finally merged (still some problems parsing the mymila dump csv, with some specific limit cases)